// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'
import fileRequest from "@/utils/file";

export function backupsList(params) {
  //此处直接使用参数
  return request({
    url: '/system/getBackupsList',
    method: 'GET',
    params
  })
}

export function backupsDo(data) {
  return request({
    url: '/system/mysqlBackups',
    method: 'POST',
    data
  })
}

export function backupsRestore(params) {
  return request({
    url: '/system/rollback',
    method: 'GET',
    params
  })
}

export function backupsDown(data) {
  return fileRequest({
    url: '/system/sqlDownload',
    method: 'POST',
    data,
    responseType:'blob'
  })
}

export function backupsDel(params) {
  return request({
    url: '/system/deleteById',
    method: 'GET',
    params
  })
}
